<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>用户统计</title>
		<script src="js/echarts.min.js"></script>
		<script src="lib/layui/jquery-1.8.3.min.js"></script>
	</head>
	<body style="height: 100%; margin: 0">

		<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
		<div id="main" style="width: 100%;height:400px;"></div>


		<script type="text/javascript">
			// 基于准备好的dom，初始化echarts实例
			var chartDom = document.getElementById('main');
			var myChart = echarts.init(chartDom);
			var option;
			var sum = 1;
			var data;
			data.
			//获取用户信息
			option = {
				title: {
					text: '用户占比统计',
					subtext: '最新数据'+ sum,
					left: 'center'
				},
				tooltip: {
					trigger: 'item'
				},
				legend: {
					orient: 'vertical',
					left: 'left',
				},
				series: [{
					name: '用户类型',
					type: 'pie',
					radius: '50%',
					data: [{name:"1",value:100},{name:"11",value:150}],
					emphasis: {
						itemStyle: {
							shadowBlur: 30,
							shadowOffsetX: 40,
							shadowColor: 'rgba(0, 0, 0, 0.5)'
						}
					}
				}]
			};
			option && myChart.setOption(option);
		</script>
	</body>
</html>
